
extern "C" {
void wls_keypad_init();
void msleep(unsigned int ms);
char wls_keypad_getkey();
int printk(const char *fmt, ...);
}

#define KEY_EXIT    0xa4
int _Do_Test_Keypad(char *param)
{
    int key = 0;
    static int init_ok = 0;

    if(init_ok == 0) {
        wls_keypad_init();
        printk("\nKeypad Init OK: ");
        init_ok = 1;
    }
    printk("\nKey  Exit - big .:\n");
    while(key != 0xa4) {
        key = wls_keypad_getkey();
        msleep(100);
        if(key != 0x0 && key != 0x54 && key != 0x1)//0x54: keypad timeout,0x0: no key pressed
            printk("\n2)Key = 0x%x\n", key);
    }
    printk("\nKey = 0x%x\n", key);
    printk("\nKeypad Test Over.\n");

    return 0;
}

